define(['app'], function(app) {
	'use strict';

	//实例化方法
	var factory = function(Http) {

		//返回信息
		return {
			getList:function(status,nPage,callbcak,calldone){
				Http.post({
					method:'member.consult.getlist',
					status:status,
					nPage:nPage,
					pagelimit:10
				},function(result){
					if(callbcak)
						callbcak(result.result);
				}, function(e) {

				}, function() {
					if(calldone)
						calldone();
				})
			},
			//回复
			answer:function(comment_id,reply_content,callbcak){
				Http.post({
					method:'member.consult.answer',
					comment_id:comment_id,
					reply_content:reply_content
				},function(result){
					if(callbcak)
						callbcak(result);
				})
			},
			//删除
			deleteWenDa:function(comment_id,callbcak){
				Http.post({
					method:'member.consult.delete',
					comment_id:comment_id
				},function(result){
					if(callbcak)
						callbcak(result);
				})
			}
		
		};
	}

	factory.$inject = ['Http'];
	return app.registerService("Wenda", factory);
});